package com.copa.gameStore.dto;

import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

/**
 * @author copa
 * @createDate 2022-09-27 11:30
 * @function
 */
@Data
public class CartDto {

    @Min(value = 1, message = "商品非法~")
    private Long gameGoodsId;

    @Min(value = 1, message = "数量非法~")
    private Integer num;

    private Long userId;

    @Min(value = 1, message = "非法选项~")
    @Max(value = 2, message = "非法选项~")
    // 购物车数量：1-累加 2-直接设值
    private Integer type = 1;

}
